package com.apanal.qlife.sys.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.apanal.qlife.common.annotation.LogType;
import com.apanal.qlife.common.annotation.SystemLog;
import com.apanal.qlife.sys.service.SMSService;

/**
 * 短信控制类
 * 
 * 
 * @author shuliangxing
 * 
 * @date 2015-8-3下午2:43:01
 */
@Controller
@RequestMapping("/sms")
public class SMSController {

	@Autowired
	SMSService service;

	/**
	 * 发送忘记密码验证码
	 * 
	 * @return
	 */
	@ResponseBody
	@RequestMapping("/{mobile}/sendForgetPwdCode")
	@SystemLog(module = "短信管理", operation = "发送忘记密码验证码", type = LogType.SMS, busiEx = true)
	public String sendForgetPwdCode(@PathVariable("mobile") String mobile) {
		return service.addAndSendForgetPwdCode(mobile);
	}
}
